package anc.tankshooter.models;

public class Rect {
	
	public float mLeft,mRight;
	public float mTop,mBottom;
	
	public Rect(float left,float right,float top,float bottom){
		mLeft=left;
		mRight=right;
		mTop=top;
		mBottom=bottom;
	}
	
	public boolean collidesWith(Rect rect){
		boolean isCollise = false;
		isCollise = !(this.mLeft > rect.mRight ||
	            this.mRight < rect.mLeft ||
	            this.mTop > rect.mBottom ||
	            this.mBottom < rect.mTop);
		return isCollise;
	}
}
